﻿@{
    ViewBag.Title = "DocView";
    Layout = null;
    string isVote = ViewData["isVote"] == null ? "N" : ViewData["isVote"].ToString();
    string docClsName = ViewData["docClsName"] == null ? "最新信息" : ViewData["docClsName"].ToString();
}

@model ElingOA6_DSJCJ.Model.Document
@if (false)
{
    <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
}
<!DOCTYPE html>
<html>
<script src="@Url.Content("~/Scripts/ntko.js", true)" type="text/javascript"></script>
<link type="text/css" href="@Url.Content("~/Content/style.css")" rel="stylesheet"  />
    

<script src="@Url.Content("~/Scripts/jquery.min.js")" type="text/javascript"></script>

<script>
    var docId=@Model.FDocId;

</script>

<script>
    $(function () {
        var url = '@ViewData["url"]';
        if (url != "") {
            editoffice(url, '@ViewData["newofficetype"]');
        }
    });
    function vote() {
        if (confirm("确定投票吗？")) {
            $.ajax({
                type: "POST",
                url: "/Index/DocumentVote",
                data: { docId: docId },
                success: function (jsonstr) {
                    var msg = jsonstr.split('|');
                    if (msg[0] == "SUCCESS") {
                        alert("投票成功");
                    }
                    else {
                        if (msg.length > 1) {
                            alert(msg[1]);
                        }
                    }
                }
            });
        }
    }

    function iframeAutoFit() {
        var ex;
        try {
            if (window != parent) {
                var a = parent.document.getElementsByTagName("IFRAME");
                for (var i = 0; i < a.length; i++) {
                    if (a[i].contentWindow == window) {
                        var h1 = 0, h2 = 0;
                        if (document.documentElement && document.documentElement.scrollHeight) {
                            h1 = document.documentElement.scrollHeight;
                        }
                        if (document.body) h2 = document.body.scrollHeight;
                        var h = Math.max(h1, h2);
                        if (window.ActiveXObject) { h += 4; }
                        else { h += 4; }
                        a[i].style.height = h + "px";
                        window.removeEventListener('resize', iframeAutoFit, false); //兼容谷歌浏览器时要去掉RISZE监听
                    }
                }
            }
        }
        catch (ex) { }
    }



</script>
<body onload="iframeAutoFit()">
@*<div style="text-align:left;">
    <div class="paging-title"><h3>@docClsName</h3></div>
    <div class="paging-content3">*@
    <div class="list_content">
    	<div class="lc_t"><h3> @ViewData["docClsName"]</h3><span><a href="#">首页</a> &gt; <a href="#">@ViewData["docClsName"]</a></span></div>
        
        <div class="p3">
            @if (Model.FEditMode == "H")
            {
                @Html.Raw(Model.FContentTxt)
            }
        </div>
        <div class="clear"></div>
    </div> 

</body>
</html>
